
public class Mouvement {
	String depart;
	String arrivee;
	int poids;
	
	int ligneDepart;
	int colonneDepart;
	
	int ligneArrivee;
	int colonneArrivee;
	
	public Mouvement(String depart, String arrivee,int poids) {
		this.depart = depart;
		this.arrivee = arrivee;
		this.poids = poids;
		
		String[] tabDep = depart.split("-");
		ligneDepart = Integer.parseInt(tabDep[0]);
		colonneDepart = Integer.parseInt(tabDep[1]);

		String[] tabArr = arrivee.split("-");
		ligneArrivee = Integer.parseInt(tabArr[0]);
		colonneArrivee = Integer.parseInt(tabArr[1]);
	}
	
	public int getPoids() {
		return this.poids;
	}
	public String toString() {
		return depart+" - "+arrivee;
	}
	
	public String getDeplacement() {
		char[] tabEquiv = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'};
		return tabEquiv[colonneDepart]+""+(8-ligneDepart) + " - " + tabEquiv[colonneArrivee]+""+(8-ligneArrivee);
	}
}
